package com.ctosb.classviewer.clazz.attr;

import com.ctosb.classviewer.ClassReader;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class LineNumberTable_attribute extends Attribute_info {

    private short line_number_table_length;
    private Line_number_table line_number_table[];

    @Override
    protected void doParse(ClassReader classReader) {
        this.line_number_table_length = classReader.readShort();
        line_number_table = new Line_number_table[line_number_table_length & 0xffff];
        for (int i = 0; i < line_number_table.length; i++) {
            line_number_table[i] = new Line_number_table().parse(classReader, getClassFile());
        }
    }
}
